package com.nd.te.pro;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;


public class data {
    private int iyear;
    private int imonth ;
    private String country;
    private String region;
    private String province;
    private String city;
    private double latitude;
    private double longitude;
    private int attack;

    //序列化
    public void write(DataOutput out) throws IOException{
        out.writeInt(iyear);
        out.writeInt(imonth);
        out.writeUTF(country);
        out.writeUTF(region);
        out.writeUTF(province);
        out.writeUTF(city);
        out.writeDouble(latitude);
        out.writeDouble(longitude);
        out.writeInt(attack);
    }

    public void readFields(DataInput in) throws IOException{
        this.iyear = in.readInt();
        this.imonth = in.readInt();
        this.country = in.readUTF();
        this.region = in.readUTF();
        this.province = in.readUTF();
        this.city = in.readUTF();
        this.latitude = in.readDouble();
        this.longitude = in.readDouble();
        this.attack = in.readInt();
    }

    public data(){

    }

    public data(int i_year, int i_month, String country, String region, String province, String city, double latitude, double longitude, int attack) {
        this.iyear = i_year;
        this.imonth = i_month;
        this.country = country;
        this.region = region;
        this.province = province;
        this.city = city;
        this.latitude = latitude;
        this.longitude = longitude;
        this.attack = attack;
    }

    public int getI_year() {
        return iyear;
    }

    public int getI_month() {
        return imonth;
    }

    public String getCountry() {
        return country;
    }

    public String getRegion() {
        return region;
    }

    public String getProvince() {
        return province;
    }

    public String getCity() {
        return city;
    }

    public double getLatitude() {
        return latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public int getAttack() {
        return attack;
    }

    public void setI_year(int i_year) {
        this.iyear = i_year;
    }

    public void setI_month(int i_month) {
        this.imonth = i_month;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }


}
